n = int(input())
for i in range(0, n+1):
    print('pow(3,{}) = {}'.format(i, 3**i))